<style>
.el-tabs--card {
  height: calc(100vh - 140px);
   /*overflow-y: auto;*/
}
.el-tab-pane {
  height: calc(100vh - 140px);
  overflow-y: auto;
}
</style>
<template>
  <div>
    <el-tabs v-model="activeName">
      <el-tab-pane label="管理员信息" name="adminList">
        <admin-list ref="adminList"/>
      </el-tab-pane>
      <el-tab-pane label="添加管理员" name="adminAddNew">
        <admin-add-new ref="adminAddNew" @changeTab="changeTab"/>
      </el-tab-pane>
      <el-tab-pane label="登录日志" name="adminLoginLog">
        <admin-login-log ref="adminLoginLog"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import adminList from "@/views/backState/staff/admin/adminList.vue";
import adminAddNew from "@/views/backState/staff/admin/adminAddNew.vue";
import adminLoginLog from "@/views/backState/staff/admin/adminLoginLog.vue";

export default {
  name: "managerMain",
  components: {
    adminList,
    adminAddNew,
    adminLoginLog
  },
  data() {
    return {
      activeName: "adminList"
    }
  },
  methods: {
    changeTab(name) {
      this.activeName = name;
      this.$refs.adminList.loadAdmin();
      this.$refs.adminAddNew.resetForm();
    }
  },
}
</script>